<?php
namespace app\serverrecommend\model;

use \app\manage\model\BaseModel;
/**
 * @author:      李颖
 * @DateTime:    2017-09-29 10:22:46
 * @Description: 推荐位模型
 */
class Recommend extends BaseModel
{
	protected $name = 'recommend';
    protected $connection = 'db_config_recommend';
    protected $autoWriteTimestamp = true;
    protected $dateFormat = 'Y-m-d';
    protected $statusText = [0 => '禁用', 1 => '正常'];
    protected $readonly = ['app_id','pid'];

    public function getStatusTextAttr($value,$data)
    {
    	return $this->statusText[$data['status']];
    }

    
}
